package com.red.springmanual.springmybatis.use;

import com.red.springmanual.springmybatis.frame.fatorybean.RedFactoryBean;
import com.red.springmanual.springmybatis.use.mapper.OrderMapper;
import com.red.springmanual.springmybatis.use.mapper.UserMapper;
import com.red.springmanual.springmybatis.use.service.UserService;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
        applicationContext.register(AppConfig.class);
        applicationContext.refresh();

        UserService userService = (UserService)applicationContext.getBean("userService");
        userService.test();

    /*    System.out.println(applicationContext.getBean("redFactoryBean"));
        System.out.println(applicationContext.getBean("&redFactoryBean"));
*/
    }
}
